import axios from '~/plugins/axios';

import * as types from '../../mutation-types/complaintlist/index';
/**
 * 投诉单号列表
 *  appeal/getAppealProcessList
 * @param commit
 * @param state
 * @param preload
 */
export const getAppealProcessList = function({commit, state}, preload) {
    return axios.post(process.env.baseUrl + '/appeal/getAppealProcessList', preload)
};

/**
 * 投诉进度屏蔽与取消
 * appealIds   投诉Ids
 * type  1正常2隐藏
 */
export const shieldAppealprocessing = function({commit, state}, preload) {
    return axios.post(process.env.baseUrl + '/appeal/shieldAppealprocessing', preload)
};



/**
 * 投诉进度详情 深刻通过页面的    屏蔽与撤销屏蔽
 * appealIds   投诉Ids
 * type  1正常2隐藏
 */
export const shieldAppealDetailInfo = function({commit, state}, preload) {
    return axios.post(process.env.baseUrl + '/appeal/shieldAppealDetailInfo', preload)
};

/***
 * 投诉进度详情 查询
 * 
 * 
 */
export const getAppealDetailInfoList = function({commit, state}, preload) {
    return axios.post(process.env.baseUrl + '/appeal/getAppealDetailInfoList', preload)
};

/***
 * 根据单号查询每个处理状态的 数量tab使用
 * 
 * 
 */
export const getAppealDetailInfoListCOUNT =  function({ commit, state }, preload)  {
    return axios.get(process.env.baseUrl + '/appeal/getAppealCount',{params:preload})
        .catch(function (error) {
        });
};

/***
 * 查询数量tab使用
 * 
 * 
 */
export const getAllAppealCount =  function({ commit, state }, preload)  {
    return axios.get(process.env.baseUrl + '/appeal/getAllAppealCount',{params:preload})
        .catch(function (error) {
        });
};

/*
*
*
获取历史申诉记录*/
export const getIprhistory = function({commit, state}, preload) {
    return axios.post(process.env.baseUrl + '/appeal/getIprhistory', preload)
};

/*
*
*
获取历史申诉记录*/
export const getDownload = function({commit, state}, preload) {
   return axios.get(process.env.baseUrl + '/appeal/downLoad',{params:preload})
        .catch(function (error) {
        });
};
